Systems that allow the ejection of cartridges at the end of extraction in coffee machines comprising a jaw are known. The principle is based on the presence of an ejector in the lower part of the jaw and the pivoting of the said ejector to remove the cartridge extracted, when the said jaw opens. The devices of the state of the art have an axis of rotation of the ejector that is too far away from the portion of coffee to be removed, which leads to the said portion of coffee being catapulted and, in falling, dirtying the machine, in the case of the extraction of a closed cartridge which opens under the effect of the rise in pressure during extraction.